package cn.exercises.oop04;

public class Student extends Person{
    // 学校school、学号stuNumber；
    // 重写工作方法（学生的工作是学习）。
    private String school;
    private String stuNumber;

    public Student() {
    }

    public Student(String name, String gender, int age, String nationality, String school, String stuNumber) {
        super(name, gender, age, nationality);
        this.school = school;
        this.stuNumber = stuNumber;
    }

    /**
     * 获取
     * @return school
     */
    public String getSchool() {
        return school;
    }

    /**
     * 设置
     * @param school
     */
    public void setSchool(String school) {
        this.school = school;
    }

    /**
     * 获取
     * @return stuNumber
     */
    public String getStuNumber() {
        return stuNumber;
    }

    /**
     * 设置
     * @param stuNumber
     */
    public void setStuNumber(String stuNumber) {
        this.stuNumber = stuNumber;
    }

    @Override
    public void work() {
        System.out.println(this.school+"学校的学生,学号:"+this.stuNumber+","+this.getName()+"正在学习");
    }
}
